import {Rate} from 'antd';
import React from 'react'

interface PinProps extends React.ComponentProps<typeof Rate> {
    checked: boolean;
    onChecledChange?: (checked: boolean) => void
}

export const Pin = ({checked, onChecledChange, ...restPros}: PinProps) => {
    return <Rate
        count={1}
        value={checked ? 1 : 0}
        onChange={num => onChecledChange?.(!!num)}
        {...restPros}
    />

}
